package com.lihongrui.learnminio.minioDemo;

import io.minio.DownloadObjectArgs;
import io.minio.MinioClient;

public class DownLoadDemo {
    public static void main(String[] args) {
                MinioClient minioClient =
                MinioClient.builder()
                        .endpoint("http://192.168.186.190:9000")
                        .credentials("minioadmin", "minioadmin")
                        .build();
        try {
            minioClient.downloadObject(
                    DownloadObjectArgs.builder()
                            .bucket("tulingmall")
                            .object("ks1cq")
                            .filename("./ks1cq.jpg")
                            .build());
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
